# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Maciej Sitarz <macieks@freesco.pl>

pkgname=mythes-pl
epoch=1
pkgver=0.8.68
pkgrel=1
pkgdesc='Polish thesaurus'
arch=('any')
url='https://dobryslownik.pl/pobierz/'
license=('LGPL')
optdepends=('libmythes: offers thesaurus library functions')
source=(https://sources.archlinux.org/other/packages/mythes-pl/pl-dict-latest-$pkgver.oxt)
sha256sums=('9583aa42893ed22989e08ed52207cb757f6b5966a3f2cd0e34b86deb825549d5')

package() {
  install -dm755 "$pkgdir"/usr/share/mythes
  install -m644 th_pl_PL_v2.* "$pkgdir"/usr/share/mythes

  # symlinks
  install -dm755 "$pkgdir"/usr/share/myspell/dicts
  pushd "$pkgdir"/usr/share/myspell/dicts
  for file in "$pkgdir"/usr/share/mythes/*; do
    ln -sv /usr/share/mythes/"$(basename $file)" .
  done
  popd
}
